//
//  InLandCityCollectionViewCell.m
//  旅游咨询
//
//  Created by 高建 on 15/4/13.
//  Copyright (c) 2015年 xubin. All rights reserved.
//

#import "InLandCityCollectionViewCell.h"

@implementation InLandCityCollectionViewCell

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    
    self.cityImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
    self.cityImageView.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.cityImageView];
    [_cityImageView release];
    
    self.cityNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.contentView.frame.size.width / 8, self.contentView.frame.size.height - 40, 80, 30)];
    [self.contentView addSubview:self.cityNameLabel];
    [_cityNameLabel release];
}

//重写set方法

-(void)setMyInLandCity:(InLandCityModel *)myInLandCity
{
    if (_myInLandCity != myInLandCity) {
        [_myInLandCity release];
        _myInLandCity = [myInLandCity retain];
    }
    
    
    self.cityNameLabel.text = self.myInLandCity.name_zh;
    

    [self.cityImageView sd_setImageWithURL:[NSURL URLWithString:self.myInLandCity.cover_s]];
    
    
    
}




@end
